package cn.turing.firecontrol.common.util;

import weixin.popular.api.MessageAPI;
import weixin.popular.api.TokenAPI;
import weixin.popular.bean.BaseResult;
import weixin.popular.bean.message.message.TextMessage;
import weixin.popular.bean.token.Token;

/**
 * @Author: yangyang
 * @Date: 2022/6/22
 */
public class WxUtil {

    //String user1 = "ottQp61Cwah-kPojbn8T_aH_h8-I";

    static String appid = "wxc24dd0ef5b5b8b5b";

    static String secret = "e0280c1716865b6678788d96ef95ffe2";

    public static void wxMessagePush(String toUser,String content) {
        Token token = TokenAPI.token(appid, secret);
        TextMessage message = new TextMessage(toUser, content);
        MessageAPI.messageCustomSend(token.getAccess_token(), message);
    }


}
